<?php
/**
 * 2016.8.9作业测试类
 * User: wuz
 * Date: 2016/8/9
 * Time: 16:25
 */
require_once '../StringExample.php';

$test = new StringExample();

//第一题
echo "第一题:";
$strExchange = "1112223334445";
echo $test->strExchange($strExchange) . "<br>"; ////第一题的转换

//第二题
echo "第二题:";
$strCutAndStrrev = "www.yaochufa.com";
echo $test->cutAndStrrev($strCutAndStrrev) . "<br>";

//第三题
echo "第三题:";
$strChangeMy   = "my_leader";
$strChangeMake = "make_by_name";
echo $test->removeAndUpper($strChangeMy) . "<br>";
echo $test->removeAndUpper($strChangeMake) . "<br>";

//第四题
echo "第四题:";
$mail = "liming@yaochufa.com";
echo $test->pickUpOne($mail) . "<br>";
echo $test->pickUpTwo($mail) . "<br>";
echo $test->pickUpThree($mail) . "<br>";
echo $test->pickUpFour($mail) . "<br>";

//第五题
echo "第五题:";
$turnWord = "There is hainan";
echo $test->turnWord($turnWord) . "<br>";

//附加题 截取新闻标题
echo "附加题:";
$title = "一二三四五六aa七八九十一二三四五六七八九十一二三四五六七八九十";
$start = 0; //自定义新闻标题开始截取的位置
echo $test->title($title, $start);
//$a = str_split($title, 10);
//echo $a[0];
